package kis.designpattern.factory;

public class CreatorByParam {
	public void export(int type)
	{
		Product p = CreateProduct(type);
		p.export();
	}

	protected Product CreateProduct(int type)
	{
		Product p = null;
		if (type == 1)
		{
			p = new SqlProduct();
		}
		if (type == 2)
		{
			p = new DocProduct();
		}
		return p;
	}
}
